home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / System / CRESC / Lengths / length-repeat-i < prev    next >
Lisp/Scheme  |  1996-12-31  |  501b  |  15 lines

  1. length-repeat-i
  2.  
  3. This is a variant on length-repeat enabling a particular length in the length-pattern to be identified and processed with the length-repeat formula. All other lengths remain untouched.
  4.  
  5. (setq rhy '(1/4 -1/16 1/8 1/16))
  6.  
  7. (setq var1 (length-repeat-i 4 '1/8 rhy))
  8. --> (1/4 -1/16 1/32 1/32 1/32 1/32 1/16)
  9.  
  10. Try this function nested several times:
  11.  
  12. (setq var2 (length-repeat-i 2 '1/4 
  13.                             (length-repeat-i 4 '1/8 rhy)))
  14. --> (1/8 1/8 -1/16 1/32 1/32 1/32 1/32 1/16)
  15.